package scalaapps

import org.apache.spark.SparkContext
import org.apache.spark.SparkConf

/**
  * Created by yang on 16-12-30.
  */
object SecApp {
  def main(args: Array[String]) {
    val conf = new SparkConf().setAppName("Find Errors").setMaster("local[2]")
    val sc = new SparkContext(conf)
    val logData = sc.textFile("hdfs://localhost:9000/NOTICE").cache()
    logData.filter(line => line.contains("software")).collect.foreach(println)
  }
}
